<template>
</template>

<script>
  const color = '#fff'
  let floor = ['80001','80002','80003','80004','80005','80006','80007','80008','80009','80010','80011','80012','80013'];
  //80001 4 B2(-2层)//80002 4 B1(-1层)//80003 4 F1(1层)//80004 4 F2(2层)
  //80005 4 F3(3层)//80006 4 F4(4层)//80007 4 F5(5层)//80008 4 F6(6层)
  //80009 4 F7(7层)//80010 4 F8(8层)//80011 4 B3(-3层)//80012 4 B4(-4层)
  //80013 4 B5(-5层)

//分析报表配置文件
  let indicator_keys = [
      'passby',
      'stay',
      'exits',
      'enters',
      'churn_rate',
      'enters_rate',
      'receipt',
      'pieces',
      'actual_sales',
      'origin_sales',
      'sold_rate',
      'discount_avg_rate',
      'guest_avg_price',
      'pieces_avg_price',
      'joint_rate',
      'attracts',
      'attract_rate',
      'shows_rate',
      'attract_time',
      'total_enters',
      'total_exits',
      'receipt_avg_price',
    ];//默认配置报表的所有指标
  let indicator_keys_yetai = [
    'passby',
    'exits',
    'enters',
    'churn_rate',
    'enters_rate',
    'receipt',
    'pieces',
    'actual_sales',
    'origin_sales',
    'sold_rate',
    'discount_avg_rate',
    'guest_avg_price',
    'pieces_avg_price',
    'joint_rate',
    'attracts',
    'attract_rate',
    'shows_rate',
    'attract_time',
    'total_enters',
    'total_exits',
    'receipt_avg_price',
  ];//业态业种指标
  //客流查询页面配置（tags：-1、排除通道  1、主要出入口  2、店铺 3、试衣间 4、柜台 5、通道 6、区域 7、展区）
  const queryList = [
    //自定义查询
    {code:'mall-free',name:'自定义查询',title:'自定义查询',tags:['1'],indicator_keys:['all'],caseTitle:'案场',areaTitle:'区域'}, //自定义查询（购物中心）
    {code:'chain-free',name:'自定义查询',title:'自定义查询',tags:['1'],indicator_keys:['all'],caseTitle:'案场',areaTitle:'区域'}, //自定义查询（连锁店）
    //购物中心-区域报表
    {code:'mall-inout',name:'出入口数据查询',title:'出入口数据',tags:['1'],indicator_keys:indicator_keys ,showKPI:['enters','exits','stay'],caseTitle:'案场',areaTitle:'出入口',org_type:'3'}, //区域-出入口数据查询（购物中心）
    {code:'mall-floor',name:'楼层数据查询',title:'楼层数据',tags:floor,indicator_keys:indicator_keys ,showKPI:['enters','exits','stay'],caseTitle:'案场',areaTitle:'楼层',org_type:'3'},   //区域-楼层数据查询（购物中心）
    {code:'mall-aisle',name:'通道数据查询',title:'通道数据',tags:['-1','5'],indicator_keys:indicator_keys ,showKPI:['enters','exits'],caseTitle:'案场',areaTitle:'通道',org_type:'3'},   //区域-通道数据查询（购物中心）
    {code:'mall-area',name:'区域数据查询',title:'区域数据',tags:['6'],indicator_keys:indicator_keys ,showKPI:['enters','exits','stay'],caseTitle:'案场',areaTitle:'区域',org_type:'3'},   //区域-区域数据查询（购物中心）
    {code:'mall-shop',name:'商铺数据查询',title:'商铺数据', tags:['2'],indicator_keys:indicator_keys ,showKPI:['enters','exits','stay'],caseTitle:'案场',areaTitle:'商铺',org_type:'3'},   //区域-商铺数据查询（购物中心）
    //购物中心-案场报表
    {code:'mall-case',name:'案场数据查询',title:'案场数据',group_type:'case',tags:[''],indicator_keys:indicator_keys,showKPI:['enters','exits','stay'],caseTitle:'案场',areaTitle:'区域',org_type:'2'},   //案场（购物中心）tags待定

    //购物中心-高低峰
    {code:'mall-caseVariableTime',name:'案场高低峰时间分析',title:'案场',tags:['1'],indicator_keys:['enters','exits','passby'],caseTitle:'案场',areaTitle:'区域',org_type:'2'}, //案场案场高低峰时间分析（购物中心）
    {code:'mall-areaVariableTime',name:'区域高低峰时间分析',title:'区域',tags:['1'],indicator_keys:['enters','exits','passby'],caseTitle:'案场',areaTitle:'区域',org_type:'3'}, //区域案场高低峰时间分析（购物中心）
    {code:'mall-yetai',name:'业态数据查询',title:'业态数据',group_type:'tag_yetai',tags:['2'],indicator_keys:indicator_keys_yetai,showKPI:['enters','exits'],org_type:'2'},   //业态（购物中心）tags待定
    {code:'mall-yezhong',name:'业种数据查询',title:'业种数据',group_type:'tag_yezhong',tags:['2'],indicator_keys:indicator_keys_yetai,showKPI:['enters','exits'],org_type:'2'},   //业种（购物中心）tags待定
    {code:'mall-louceng',name:'楼层数据查询',title:'楼层数据',group_type:'tag_louceng',tags:['1'],indicator_keys:indicator_keys_yetai,showKPI:['enters','exits'],org_type:'2'},   //楼层（购物中心）tags待定 楼层tag待定
    {code:'mall-pinpai',name:'品牌数据查询',title:'品牌数据',group_type:'tag_pinpai',tags:['2'],indicator_keys:indicator_keys_yetai,showKPI:['enters','exits'],org_type:'2'},   //品牌（购物中心）tags待定
    //购物中心-热力图
    {code:'mall-casesHeatMap',name:'楼层热力图',title:'案场',tags:['1'],indicator_keys:['exits'],caseTitle:'案场',areaTitle:'楼层',org_type:'3'}, //区域案场高低峰时间分析（购物中心）
    //购物中心-案场kpi时间对比
    {code:'mall-case-time-pk',name:'案场KPI时间对比',title:'案场KPI时间对比',tags:['1'],indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'案场',areaTitle:'区域',org_type:'2'},   //案场（购物中心）

    //购物中心-区域kpi对比
    {code:'mall-area-pk',name:'区域KPI对比',title:'区域KPI对比',indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'案场',areaTitle:'区域',org_type:'3'},   //区域KPI对比（购物中心）
    //购物中心-区域kpi时间对比
    {code:'mall-area-time-pk',name:'区域KPI时间对比',title:'区域KPI时间对比',tags:['6'],indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'案场',areaTitle:'区域',org_type:'3'},   //区域（购物中心）
    {code:'mall-shop-time-pk',name:'商铺KPI时间对比',title:'商铺KPI时间对比',tags:['2'],indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'案场',areaTitle:'商铺',org_type:'3'},   //商铺（购物中心）
    {code:'mall-floor-time-pk',name:'楼层KPI时间对比',title:'楼层KPI时间对比',tags:floor,indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'案场',areaTitle:'楼层',org_type:'3'},   //楼层（购物中心）
    {code:'mall-aisle-time-pk',name:'通道KPI时间对比',title:'通道KPI时间对比',tags:['-1','5'],indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'案场',areaTitle:'通道',org_type:'3'},   //通道（购物中心）

    //购物中心-排行榜
    {code:'mall-caserank',name:'案场运营排行榜',title:'案场运营排行榜',tags:['1'],indicator_keys:['enters','exits','stay','actual_sales','receipt','sold_rate'],caseTitle:'案场',org_type:'2'}, //案场排行榜(购物中心) tags待定
    {code:'mall-arearank',name:'商铺运营排行榜',title:'商铺运营排行榜',tags:['2'],indicator_keys:['enters','exits','stay','actual_sales','receipt','sold_rate'],caseTitle:'商铺',org_type:'3'}, //区域排行榜（购物中心）

    //购物中心-人脸数据
    {code:'mall-comp-Face',name:'企业人脸数据查询',title:'企业人脸数据查询',tags:['1'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],caseTitle:'',org_type:'1'}, //企业人脸数据查询（购物中心）
    {code:'mall-case-Face',name:'案场人脸数据查询',title:'案场人脸数据查询',tags:['1'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],caseTitle:'案场',org_type:'2'}, //案场人脸数据查询（购物中心）
    {code:'mall-area-Face',name:'主出入口人脸数据查询',title:'主出入口人脸数据查询',tags:['1'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],caseTitle:'案场',areaTitle:'区域',org_type:'3'},   //区域人脸数据查询（购物中心）
    {code:'mall-store-Face',name:'店铺人脸数据查询',title:'店铺人脸数据查询',tags:['2'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],caseTitle:'案场',areaTitle:'店铺',org_type:'3'},   //区域人脸数据查询（购物中心）
    {code:'mall-zone-Face',name:'展区人脸数据查询',title:'展区人脸数据查询',tags:['7'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],caseTitle:'案场',areaTitle:'展区',org_type:'3'},   //区域人脸数据查询（购物中心）

    {code:'mall-shop-Face',name:'店铺导流',title:'店铺导流',tags:['1'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],org_type:'3'},   //店铺导流（购物中心）
    {code:'mall-first-shop',name:'首选店铺',title:'首选店铺',tags:['2'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],org_type:'2'},   //首选店铺（购物中心）
    {code:'mall-show-ranking',name:'店铺排行',title:'店铺排行',tags:['2'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],org_type:'2'},   //店铺排行（购物中心）

    {code:'mall-case-pass-rank',name:'数据排行榜',title:'数据排行榜',tags:['1'],indicator_keys:['enters','exits','stay'],org_type:'1'}, //案场排行榜(购物中心)

    //连锁店-区域报表
    {code:'chain-area',name:'区域数据查询',title:'区域数据',tags:['6'],indicator_keys:indicator_keys,showKPI:['enters','exits','stay'],caseTitle:'连锁店',areaTitle:'位置',org_type:'3'},//区域-数据查询(连锁店)
    {code:'chain-pass',name:'通道数据查询',title:'通道数据',tags:['-1','5'],indicator_keys:indicator_keys,showKPI:['enters','exits','stay'],caseTitle:'案场',areaTitle:'通道',org_type:'3'},//区域-通道数据查询（连锁店）
    //连锁店-案场报表
    {code:'chain-case',name:'店铺数据查询',title:'店铺数据',group_type:'case',tags:[''],indicator_keys:indicator_keys,showKPI:['enters','exits','stay'],caseTitle:'连锁店',areaTitle:'',org_type:'2'},   //案场-数据查询(连锁店)
    //连锁店-高低峰
    {code:'chain-caseVariableTime',name:'店铺高低峰时间分析',title:'店铺',tags:['2'],indicator_keys:['enters','exits','passby'],caseTitle:'案场',areaTitle:'区域',org_type:'2'}, //案场高低峰时间分析（连锁店）
    //连锁店-排行榜
    {code:'chain-caserank',name:'店铺运营排行榜',title:'店铺运营排行榜',tags:['2'],indicator_keys:['enters','exits','stay','actual_sales','receipt','sold_rate'],caseTitle:'店铺',org_type:'1'}, //案场排行榜(连锁店)
    //连锁店-案场kpi时间对比
    {code:'chain-case-pk',name:'店铺KPI对比',title:'店铺KPI对比',tags:['2'],indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'店铺',areaTitle:'区域',org_type:'2'},   //案场（连锁店）
    {code:'chain-case-time-pk',name:'店铺KPI时间对比',title:'店铺KPI时间对比',tags:['2'],indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'店铺',areaTitle:'区域',org_type:'2'},   //案场（连锁店）
    {code:'chain-pass-time-pk',name:'通道KPI时间对比',title:'通道KPI时间对比',tags:['-1','5'],indicator_keys:['enters','exits','stay','actual_sales','receipt'],caseTitle:'店铺',areaTitle:'通道',org_type:'2'},   //案场（连锁店）
    //连锁店-人脸数据
    {code:'chain-comp-Face',name:'企业人脸数据查询',title:'企业人脸数据查询',tags:['2'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],caseTitle:'',org_type:'1'}, //企业人脸数据查询（购物中心）
    {code:'chain-case-Face',name:'店铺人脸数据查询',title:'店铺人脸数据查询',tags:['2'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],caseTitle:'店铺',org_type:'2'}, //案场人脸数据查询（购物中心）
    {code:'chain-area-Face',name:'区域人脸数据查询',title:'区域人脸数据查询',tags:['2'],indicator_keys:['face_total_enters','face_repeats_enters','face_member_enters'],caseTitle:'店铺',areaTitle:'区域',org_type:'3'},   //区域人脸数据查询（购物中心）

    //驾驶舱
    {name:'实时数据驾驶舱',title:'实时数据驾驶舱',tags:['2'],type:'chain',indicator_keys:['enters','exits','receipt','actual_sales','sold_rate','guest_avg_price'],caseTitle:'案场',areaTitle:'区域',org_type:'3'}, //实时数据驾驶舱
    {name:'tag1实时数据驾驶舱',title:'实时数据驾驶舱',tags:['1'],type:'mall',indicator_keys:['enters','exits','receipt','actual_sales','sold_rate','guest_avg_price'],caseTitle:'案场',areaTitle:'区域',org_type:'3'}, //tag1实时数据驾驶舱
    //展示效果kpi
    {code:'chain-show',name:'展示效果kpi',title:'展示效果kpi',tags:['7'],indicator_keys:indicator_keys,showKPI:['passby'],caseTitle:'案场',areaTitle:'展区',org_type:'3'}, //展示效果kpi

    {name:'企业查询报表',title:'企业查询报表',tags:['2'],indicator_keys:['enters','exits','stay'],caseTitle:'案场',areaTitle:'区域',org_type:'3'}, //企业查询报表
    {name:'店铺销售',title:'店铺销售查询',tags:['2'],indicator_keys:['enters','exits','actual_sales','receipt','sold_rate'],caseTitle:'案场',areaTitle:'区域',org_type:'2'},   //店铺销售(连锁店)

    {code:'member-vip',name:'会员',title:'会员列表',person_type:'1',memberName:'会员号',memberDate:'入会日期',},   //会员列表
    {code:'member-Blacklist',name:'黑名单',title:'黑名单列表',person_type:'8',memberName:'黑名单号',memberDate:'拉黑日期',},   //黑名单列表

  ];

  //数据颜色显示
  const colorList ={
    passby: "#67e6b2", //经过客流
    stay: "#77e7ff", //滞留人数
    exits: "#ffc02e", //离开人数
    enters: "#2c69f3", //进入人数
    churn_rate: "#9f70ff", //流失率
    enters_rate: "#b72cff", //入店率

    receipt: "#8032e2" ,//成交量
    pieces: "#e858bd" ,//成交商品量
    actual_sales: "#ea6881", //销售金额
    origin_sales: "#f28e7b", //原价金额
    sold_rate: "#f1b89b", //成交率
    discount_avg_rate: "#f2dfa5", //折扣率
    guest_avg_price: "#5db8ff", //客单价
    pieces_avg_price: "#e7780b", //件单价
    joint_rate: "#eb5c5c", //连带率

    attracts: "#9dff6d", //吸引客流
    attract_rate: "#f3e657", //吸引率
    shows_rate: "#FD8E56", //展示率
    attract_time: "#ac2525", //吸引时长
    total_enters: "#560cb3", //总进入客流
    total_exits: "#560cb3", //总离开客流
    receipt_avg_price: "#560cb3", //票单价
    face_total_enters: "#224ef0", //客流
    face_member_enters: "#fda440", //会员
    face_repeats_enters: "#de002a", //回头客
  }
  const unit={
    enters: "人", //进入人数
    exits: "人", //离开人数
    passby: "人", //经过客流
    enters_rate: "%", //入店率
    churn_rate: "%", //流失率
    stay: "人" ,//滞留人数

    receipt: "笔" ,//成交量
    pieces: "件" ,//成交商品量
    actual_sales: "元", //销售金额
    origin_sales: "元", //原价金额
    sold_rate: "%", //成交率
    discount_avg_rate: "%", //折扣率
    guest_avg_price: "元", //客单价
    pieces_avg_price: "元", //件单价
    joint_rate: "%", //连带率
    receipt_avg_price: "元", //票单价

    attracts: "人", //吸引客流
    attract_rate: "%", //吸引率
    shows_rate: "%", //展示率
    attract_time: "秒", //吸引时长
    total_enters: "人", //总进入客流
    total_exits: "人", //总离开客流
    face_total_enters:'人',//客流
    face_member_enters:'人',//会员
    face_repeats_enters:'人',//回头客
  }
  const name = {
    enters: "进入人数", //进入人数
    exits: "离开人数", //离开人数
    passby: "经过客流", //经过客流
    enters_rate: "入店率", //入店率
    churn_rate: "流失率", //流失率
    stay: "滞留人数" ,//滞留人数

    receipt: "成交量" ,//成交量
    pieces: "成交商品量" ,//成交商品量
    actual_sales: "销售金额", //销售金额
    origin_sales: "原价金额", //原价金额
    sold_rate: "成交率", //成交率
    discount_avg_rate: "折扣率", //折扣率
    guest_avg_price: "客单价", //客单价
    pieces_avg_price: "件单价", //件单价
    joint_rate: "连带率", //连带率
    receipt_avg_price: "票单价", //票单价

    attracts: "吸引客流", //吸引客流
    attract_rate: "吸引率", //吸引率
    shows_rate: "展示率", //展示率
    attract_time: "吸引时长", //吸引时长
    total_enters: "总进入客流", //总进入客流
    total_exits: "总离开客流", //总离开客流

    face_total_enters:'客流',//客流
    face_member_enters:'会员',//会员
    face_repeats_enters:'回头客',//回头客
  }
  const tableColArea=[
    {
     key:'caseName',
     name:'案场名称',
    },
    {
     key:'areaName',
     name:'区域名称',
    },
    {
     key:'kpi',
     name:'指标',
    },
    {
     key:'seatName',
     name:'统计位置（分布）',
    },
    {
     key:'case_code',
     name:'案场编号',
    },
  ];
  const tableColCase=[
    {
     key:'caseName',
     name:'案场名称',
    },
    {
     key:'kpi',
     name:'指标',
    },
    {
     key:'case_code',
     name:'案场编号',
    },
  ]
  const showTableMaxItemList = 500;//报表页面item_list长度上限，超过上限不直接显示table表格
  //快速配置运维工程师菜单id List
  const menu_id_list = [
    "8e3938d79e6b4b1e81be3e53b51d3293",
    "62f2d2c8a2e8499caba42b2c17cadcba",
    "27c6aef85fa74289aa43d0d162009ca0",
    "38d0c33edfc24a4db07f0a86d18624e8",
    "9e75b48afb91433ea183b91b710dab94",
    "3ace0918db3d49ad9a4ac48fd3e90035",
    "876f703e1b1c4ef5aca382e25e92ac02",
    "a63494bca54b4783ae10b627e3a54a7e",
    "d9b920bf03df4864971934d83f6a86aa",
    "dfcd183832b849e4b06453380a3a4739",
    "47d3d7bafd0745d99c65c13646881b98",
    "5a047fd3c8ea4464823c7c916f697800",
    "62a90dc130b9461cab89171efde48b69",
    "ab2ad78b36b84e9aa543ff72b6909a59",
    "b692051f3216400ea766776a05969fec",
    "db7ec3bbdc6845b4821e20646808e139",
    "dd192dca632f4866aa187e35da1b0ad6",
    "84162b88860f4fd3a112db76d38d51b4",
    "187fe00770e84459b968b9532f8d476f",
    "429b3f2c13fc48fb811643c58499cfd5",
    "63b863c28e5045b5b39a6126f7306398",
    "7f76f73ca6c84df4a754df3c8690bdba",
    "8200f648c19b4964b8c1f3b46d804738",
    "8aaf4900b93c42fbbef152bd7566af69",
    "7de5aaa5b4c347e59d29bbed5620e98e",
    "2cc1737e8c9c4bf38d128c265d906b7e",
    "5fc29d8060ea49f59a2041b61bc9f4f6",
    "8898e1074886434283d794f71cc356d5",
    "931839e062e945238361826a611add40",
    "b33872cb32c644e7b6cedf2d1436e977",
    "b62ba5632f0f47c1b4f5a2890ec7c200",
    "bb174b60cb0c40a48f75693aecabd86d",
    "f3b0cd6d9de34cde9c6fd5bc2aced070",
    "35b99b083b9745dd88c4864ce6fa0674",
    "238bbace9b774a328034434e399fc9e7",
    "48203b25e9d34a1aa8aff167aa70a898",
    "71926644e8de46d09ef3f1bbc642d27f",
    "341144424a11430498765695673adc77",
    "c19822b4289f4e968d66bfbc2c41c0d0",
    "9316e1b46b974501b0e0c5d4be63e39d",
    "be9d46fc071545a19ac5df3d4afd99d6",
    "6c79fc9344f144489d7826eab6cceacf",
    "f7b3585affb34e0dafc4880c72b9f5fe",
    "22958520be1c4f2983c857448afc1a1b",
    "a1c14b17299247ae81b58af1f7661cf0",
    "3bb54250d6944cdea2559b203eb3ae7f",
    "3b9cd16f7131427ba7612a91b050c2b7"]
  export default {
    queryList,
    colorList,
    unit,
    name,
    tableColArea,
    tableColCase,
    showTableMaxItemList,
    menu_id_list,
  }
</script>



